<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace longbingcore\heepay;

include "Util.php";
class AddUser
{
    protected $appid;
    protected $draw_cash_type;
    protected static $uniacid;
    public function __construct($uniacid)
    {
        self::$uniacid = $uniacid;
    }
    public function addUser()
    {
        $Oldbiz_content = ["if_sign" => "1", "business_developer" => "张三", "customer_type" => "1", "register_type" => "HEEPAY_MERCH", "customer_name" => "小二黑科技有限公司", "customer_short_name" => "小锤", "customer_phone" => "12312312312", "licence_code" => "98665112MA7HB5C80P", "licence_valid_type" => "1", "licence_valid_begin" => "2021-05-21", "licence_valid_end" => "2033-05-21", "licence_region_code" => "110108", "licence_address" => "北京市海淀区中关村", "business_category_code" => "1035", "legal_name" => "张三", "legal_id_card" => "610321192303032321", "legal_id_card_valid_type" => "1", "legal_id_card_valid_begin" => "2023-10-26", "legal_id_card_valid_end" => "2033-10-26", "legal_mobile" => "18312344321", "contact_name" => "李四", "contact_id_card" => "610321199303203921", "contact_id_card_valid_type" => "1", "contact_id_card_valid_begin" => "2021-05-21", "contact_id_card_valid_end" => "2041-05-21", "contact_mobile" => "13943211234", "contact_email" => "12345124214312@qq.com", "bank_account_type" => "1", "bank_account_name" => "小二黑科技有限公司", "bank_card_no" => "61021234123", "bank_name" => "建设银行", "bank_region_code" => "110100", "withdraw_type" => "1", "licence_img" => "/public/01/20231208/ff3b85802ff9fced6371b3b61c2c0548.png", "company_build_img" => "/public/01/20231208/ff3b85802ff9fced6371b3b61c2c0548.png", "company_front_img" => "/public/01/20231208/ff3b85802ff9fced6371b3b61c2c0548.png", "shop_env_img" => "/public/01/20231208/ff3b85802ff9fced6371b3b61c2c0548.png", "reg_certificate_img" => "/public/01/20231208/ff3b85802ff9fced6371b3b61c2c0548.png", "legal_id_card_front_img" => "/public/01/20231208/ff3b85802ff9fced6371b3b61c2c0548.png", "legal_id_card_back_img" => "/public/01/20231208/ff3b85802ff9fced6371b3b61c2c0548.png", "contact_id_card_front_img" => "/public/01/20231208/ff3b85802ff9fced6371b3b61c2c0548.png", "contact_id_card_back_img" => "/public/01/20231208/ff3b85802ff9fced6371b3b61c2c0548.png"];
        $app_id = "hykj001";
        $charset = "utf-8";
        $biz_content = json_encode($Oldbiz_content, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
        $method = "customer.entry.apply";
        $format = "json";
        $sign_type = "RSA2";
        $version = "1.0";
        $notify_url = "http://www.baidu.com";
        $arrayData = ["app_id" => $app_id, "biz_content" => $biz_content, "charset" => $charset, "method" => $method, "format" => $format, "sign_type" => $sign_type, "version" => $version, "notify_url" => $notify_url];
        $signatureContent = Util\ASCIIAZ($arrayData);
        echo "签名前参数：" . $signatureContent;
        echo "<br/><hr>";
        $sign = Util\RSA2sign($signatureContent);
        $request_data = ["charset" => $charset, "biz_content" => $biz_content, "method" => $method, "format" => $format, "sign" => $sign, "sign_type" => $sign_type, "version" => $version, "app_id" => $app_id, "notify_url" => $notify_url];
        $jsonString = json_encode($request_data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
        $arrayData1 = Util\DeleteValue($jsonString);
        echo "请求json" . $arrayData1;
        echo "<br/><hr>";
        $Posturl = "https://openapi.heepay.com/customer-api/gateway";
        $jsonData = $arrayData1;
        Util\PostJson($Posturl, $jsonData);
    }
}

?>